package com.zyl.courseservice.controller;

import com.zyl.commonutils.ResponseResult;
import org.springframework.web.bind.annotation.*;

/**
 * Auther:郑誉略
 * Date: 2020-12-08 9:46
 * Description: <描述>
 */
@RestController
@RequestMapping({"/user"})
@CrossOrigin
public class loginController {

    @PostMapping({"login"})
    public ResponseResult login() {
        return ResponseResult.ok().data("token", "admin");
    }

    @GetMapping({"info"})
    public ResponseResult info() {
        return ResponseResult.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }
}
